package com.itheima.d10_io_data;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;

/**
 * 目标：了解打印流的基本使用
 */
public class Test2 {

    public static void main(String[] args) {
        try (
                DataInputStream dos = new DataInputStream(
                        new FileInputStream("day11_io\\src\\com\\itheima\\d10_io_data\\yang.txt"));

                ){

            byte b = dos.readByte();
            System.out.println(b);

            String s = dos.readUTF();
            System.out.println(s);

            int i = dos.readInt();
            System.out.println(i);

            double v = dos.readDouble();
            System.out.println(v);

        } catch (Exception e) {
            throw new RuntimeException(e);
        }


    }
}
